-- GENERATED SPELL FOR [Azure Magus] --


function spell0_26722(pUnit, Event) --@Arcane Shock,n/a--
pUnit:FullCastSpellOnTarget(37132,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26722', 12000, 1)
end

function spell1_26722(pUnit, Event) --@Arcane Shock,n/a--
pUnit:FullCastSpellOnTarget(56776,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26722', 12000, 1)
end

function spell2_26722(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15530,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26722', 7000, 1)
end

function spell3_26722(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(56775,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26722', 6500, 1)
end

function Sorts_26722(pUnit, Event)
local choix_sorts_26722 = math.random(0, 3)
if choix_sorts_26722 == 0 then
pUnit:RegisterEvent('spell0_26722', 1, 1)
end
if choix_sorts_26722 == 1 then
pUnit:RegisterEvent('spell1_26722', 1, 1)
end
if choix_sorts_26722 == 2 then
pUnit:RegisterEvent('spell2_26722', 1, 1)
end
if choix_sorts_26722 == 3 then
pUnit:RegisterEvent('spell3_26722', 1, 1)
end
end

function mob26722_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26722', math.random(1500, 3000), 1)
end

function mob26722_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26722_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26722_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26722, 1, 'mob26722_Action')
RegisterUnitEvent(26722, 2, 'mob26722_Leave')
RegisterUnitEvent(26722, 3, 'mob26722_Kill')
RegisterUnitEvent(26722, 4, 'mob26722_Die')
